@import "../variables";
@import "../mixins/clearfix";
@import "../mixins/layered-coins";

.contract-board {
  margin-top: 50px;
  margin-bottom: 50px;
  padding: 30px 84px 30px 78px;
  border: 1px solid #E3EDF7;
  overflow: hidden;

  .contract {
    &__manager {
      float: right;
      min-width: 235px;
      padding: 25px 37px 50px;
      border: 1px solid #DAE6F7;
      background-color: #F6F7FB;
      color: #444F5A;
      font-size: 15px;

      .title {
        margin-top: 0;
        margin-bottom: 18px;
        font-weight: 700;
        font-size: 15px;
      }

      .desc {
        margin-bottom: 18px;

        > .icon {
          margin-right: 20px;
        }

        &:last-child {
          margin-bottom: 0;
        }
      }
    }

    &__status {
      float: left;
      text-align: center;

      .status__head {
        margin-bottom: 26px;
        font-size: 15px;
        font-weight: 700;
        color: #6F6F6F;
      }

      .status__img {
        width: 126px;
        margin: 0 auto 17px;
        > img {
          display: block;
          width: 100%;
          height: auto;
        }
      }

      .status__desc {
        font-size: 19px;
      }

      @each $name, $color in (signing #F5AC41,
                              lending #25D97E,
                              refunding #6897FF,
                              closeout #A1A1A2,
                              resign #FC6F43,
                              failure #A1A1A2) {
        &--#{$name} {
          .status__desc {
            color: $color;
          }
        }
      }
    }

    &__info {
      padding-left: 320px;
      padding-right: 320px;

      .info__list {
        margin: 0;
        padding: 0;
        list-style: none;

        > li {
          padding-bottom: 10px;
          overflow: hidden;
          border-bottom: 1px dashed #A9B0BD;

          + li {
            padding-top: 8px;
          }
        }
      }

      .info__label {
        float: left;
        width: 120px;
        margin: 0;
        padding: 0;
        margin-right: 20px;
        font-weight: 400;
        text-align: right;
      }

      .info__content {
        margin: 0;
        overflow: hidden;

        > .badge {
          color: $primary;
          border: 1px solid $primary;
          background-color: #E8EFFF;
          font-weight: 400;

          &.disabled {
            color: #CCCCCC;
            border-color: #F1F1F1;
            background-color: #F1F1F1;
          }
        }
      }
    }
  }
}

.order-detail {
  .flatabs {
    margin: 50px 0;
  }

  .tab-content {
    margin-bottom: 40px;
    padding: 0 50px;
  }

  .basicinfo {
    overflow: hidden;

    &__form {
      float: left;
      width: 374px;

      + .basicinfo__form {
        margin-left: 226px;
      }
    }
  }

  .interest {
    overflow: hidden;

    &__left {
      float: left;
      width: 500px;
      padding-right: 126px;
    }

    &__right {
      float: left;
      width: 600px;
    }

    &-form-group {
      display: table;
      margin-top: 18px;

      .form-group {
        display: table-cell;
        width: 1%;

        + .form-group {
          padding-left: 30px;
        }
      }
    }
  }

  .table .btn {
    border-radius: 4px;
  }
}

.product-visualizer {
  display: flex;
  padding: 65px;
  border: 1px solid #EDF0F2;
  align-items: flex-start;
  justify-content: center;
  
  .visualizer__spec {
    text-align: center;

    + .visualizer__spec {
      margin-left: 118px;
    }

    .spec {
      &__hd {
        margin: 0 0 18px;
        font-size: 16px;
        color: #6F6F6F;
      }

      &__bd {
        overflow: hidden;
      }
    }

    .period {
      width: 104px;
      height: 104px;
      border: 2px solid #25D97E;
      text-align: center;
      line-height: 104px;
      white-space: nowrap;
      font-size: 26px;
      font-weight: 700;
      color: #25D97E;
      border-radius: 104px;  
    }
  }

  &.failure {

    .period {
      border-color: #B4B4B4;
      color: #B4B4B4;
    }

    .layered-coins__inner {
      @include layered-coins(#B4B4B4);
    }

    .layered-coins__amount {
      color: #B4B4B4;
    }
  }
}

.layered-coins {
  padding-left: 5px;
  padding-right: 5px;
  color: #25D97E;

  &__inner {
    width: 93px;
    height: 34px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 34px / 2 * 3 + 8px;
    border-radius: 50%;
    @include layered-coins(#25D97E);
  }

  &__amount {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
  }
}
